import hide_loading from '@dfeidao/atom-wxapp/api/interaction/hide-loading';
import show_loading from '@dfeidao/atom-wxapp/api/interaction/show-loading';
import { IFeidaoAiWeappPage } from '@dfeidao/atom-wxapp/interfaces';
import set_local from '@dfeidao/atom-wxapp/local/set';
import nodejs from '@dfeidao/atom-wxapp/msg/nodejs';
import render from '@dfeidao/atom-wxapp/render/render';
export default async function a001(fd: IFeidaoAiWeappPage) {

	const a = fd.data.params.pick_no;
	try {
		// app-pick_detail-find
		const data = await nodejs<any[]>('ready-det/s001', {
			filter: { pick_no: a },
			page_size: 2,
			page_no: 1
		});
		render(fd, { data });
		set_local(fd, 'page_no', 1);
		set_local(fd, 'name', '');
		set_local(fd, 'pick_no', a);
		set_local(fd, 'list_data', data);
		console.log('-----------------------', data, a);
	} catch (error) {
		show_loading('读取数据失败');
		hide_loading();
	}
}
